<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<!DOCTYPE HTML>
<html lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>新增就业信息</title>
<c:import url="/WEB-INF/jsp/head.jsp" />
<link rel="stylesheet"
	href="static/css/bootstrap-datetimepicker.min.css">
<link rel="stylesheet" href="static/css/bootstrap-table.min.css">
<script type="text/javascript" src="static/js/bootstrap-table.min.js"></script>
<script type="text/javascript"
	src="static/js/bootstrap-table-zh-CN.min.js"></script>
<script type="text/javascript"
	src="static/js/bootstrap-datetimepicker.min.js"></script>
<script type="text/javascript"
	src="static/js/locales/bootstrap-datetimepicker.zh-CN.js"></script>
<script type="text/javascript" src="static/js/employment/add.js"></script>
</head>
<body>
	<div class="default-theme container-fluid iframe">
		<div class="col-md-8">
			<form id="employmentForm" class="form-horizontal"
				action="employment/add" method="post">

				<div class="form-group">
					<input type="file" id="imagePath" class="form-control"
						style="display: none;" /> <input type="hidden" name="imagePath"
						value="" /> <label for="imagePath" class="col-sm-2 control-label">照片</label>
					<div class="col-sm-10">
						<input type="text" class="form-control" id="imageName"
							onclick="$('#imagePath').click()" readonly="readonly"
							placeholder="点击上传" />
					</div>
				</div>

				<div class="form-group">
					<label for="student.id" class="col-sm-2 control-label"><i
						class="text-danger">*</i> 学生</label>
					<div class="col-sm-10">
						<input type="hidden" name="student.id" id="studentId" /> <input
							type="text" data-toggle="modal" data-target="#studentSelect"
							class="form-control" readonly="readonly" name="student.name"
							id="studentName" placeholder="点击选择学生">
					</div>
				</div>
				<div class="form-group">
					<label for="" class="col-sm-2 control-label"><i
						class="text-danger">*</i>就业老师</label>
					<div class="col-sm-10">
						<input type="hidden" name="teacher.id" /> <input type="text"
							data-toggle="modal" data-target="#teacherSelect"
							class="form-control" readonly="readonly" name="teacher.name"
							id="teacherName" placeholder="点击选择就业老师" />
					</div>
				</div>
				<div class="form-group">
					<label for="employmentDate" class="col-sm-2 control-label">就业时间</label>
					<div class="col-sm-10">
						<div class="input-group">
							<input type="text" class="form-control datetimepicker"
								name="employmentDate" readonly="readonly"
								placeholder="点击选择就业时间,不选则选取当前时间" /> <span
								class="input-group-btn">
								<button class="btn btn-default" type="button"
									onclick="clearDate(this)">
									<span class="glyphicon glyphicon-refresh" aria-hidden="true"></span>
								</button>
							</span>
						</div>
					</div>
				</div>
				<div class="form-group">
					<label for="employmentType.value" class="col-sm-2 control-label"><i
						class="text-danger">*</i>就业方式</label>
					<div class="col-sm-10">
						<c:forEach items="${employmentTypes }" var="item">
							<label class="radio-inline"> <input type="radio"
								name="employmentType.value" onclick="getEmployment()"
								value="${item.value }" typeName="${item.name }"
								<c:if test="${item.name eq '推荐'}">checked="checked"</c:if> />${item.name }&nbsp;
							</label>
						</c:forEach>
					</div>
				</div>
				<div class="form-group">
					<label for="companyName" class="col-sm-2 control-label"><i
						class="text-danger">*</i>公司名称</label>
					<div class="col-sm-10">
						<input type="text" name="companyName" class="form-control"
							placeholder="请输入" />
					</div>
				</div>
				<div class="form-group">
					<label for="job" class="col-sm-2 control-label"><i
						class="text-danger">*</i>工作职位</label>
					<div class="col-sm-10">
						<input type="text" class="form-control" name="job"
							placeholder="请输入" />
					</div>
				</div>
				<div class="form-group">
					<label for="employmentCity" class="col-sm-2 control-label"><i
						class="text-danger">*</i>就业城市</label>
					<div class="col-sm-10">
						<input type="text" class="form-control" name="employmentCity"
							placeholder="请输入" />
					</div>
				</div>
				<div class="form-group">
					<label for="referNum" class="col-sm-2 control-label"><i
						class="text-danger">*</i>推荐次数</label>
					<div class="col-sm-10">
						<input type="number" class="form-control" value="1"
							name="referNum" placeholder="默认为1" />
					</div>
				</div>
				<div class="form-group">
					<label for="companyType.value" class="col-sm-2 control-label">所属行业</label>
					<div class="col-sm-10">
						<select name="companyType.value" class="form-control">
							<option value="">请选择</option>
							<c:forEach items="${companyTypes }" var="item">
								<option value="${item.value }">${item.name }</option>
							</c:forEach>
						</select>
					</div>
				</div>
				<div class="form-group">
					<label for="companyScale.value" class="col-sm-2 control-label">公司规模</label>
					<div class="col-sm-10">
						<select name="companyScale.value" class="form-control">
							<option value="">请选择</option>
							<c:forEach items="${companyScales }" var="item">
								<option value="${item.value }">${item.name }</option>
							</c:forEach>
						</select>
					</div>
				</div>
				<div class="form-group">
					<label for="isCorrespond" class="col-sm-2 control-label"><i
						class="text-danger">*</i>是否对口</label>
					<div class="col-sm-10">
						<label class="radio-inline"> <input type="radio"
							name="isCorrespond" value="0" />否
						</label> <label class="radio-inline"> <input type="radio"
							checked="checked" name="isCorrespond" value="1" />是
						</label>
					</div>
				</div>
				<div class="form-group">
					<label for="salary" class="col-sm-2 control-label"><i
						class="text-danger">*</i>薪资</label>
					<div class="col-sm-10">
						<input type="number" name="salary" step="0.01"
							class="form-control" placeholder="薪资" />
					</div>
				</div>
				<div class="form-group">
					<label for="ext3" class="col-sm-2 control-label">薪资福利</label>
					<div class="col-sm-10">
						<textarea name="ext3" rows="2" cols="" class="form-control"
							placeholder="薪资福利"></textarea>
					</div>
				</div>
				<div class="form-group">
					<label for="ext1" class="col-sm-2 control-label">其他补贴</label>
					<div class="col-sm-10">
						<input type="text" name="ext1" class="form-control"
							placeholder="其他补贴" />
					</div>
				</div>
				<div class="form-group">
					<label for="ext2" class="col-sm-2 control-label">综合薪资</label>
					<div class="col-sm-10">
						<input type="text" name="ext2" class="form-control"
							placeholder="综合薪资" />
					</div>
				</div>
				<div class="form-group">
					<label for="remarks" class="col-sm-2 control-label">备注</label>
					<div class="col-sm-10">
						<textarea name="remarks" rows="2" cols="" class="form-control"
							placeholder="备注信息"></textarea>
					</div>
				</div>


				<div class="form-group">
					<div class="col-sm-offset-2 col-sm-10">
						<button type="submit" class="btn btn-primary">提交</button>
						<button type="reset" class="btn btn-default">重置</button>
					</div>
				</div>
			</form>
		</div>

		<div class="modal fade" id="result" tabindex="-1" rose="dialog"
			aria-labelledby="myModalLabel">
			<div class="modal-dialog" role="document">
				<div class="modal-content">
					<div class="modal-header">
						<a class="close" data-dismiss="modal" aria-label="Close"><span
							aria-hidden="true">&times;</span></a>
						<h4 class="modal-title">提示</h4>
					</div>
					<div class="modal-body">
						<span id="response"></span>
					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
					</div>
				</div>
			</div>
		</div>


		<div class="modal fade" id="teacherSelect" tabindex="-1" role="dialog">
			<div class="modal-dialog" role="document">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal"
							aria-label="Close">
							<span aria-hidden="true">&times;</span>
						</button>
						<h4 class="modal-title">就业老师</h4>
					</div>
					<div class="modal-body form-inline" style="overflow: hidden;">
						<div class="col-md-12">
							<div class="panel panel-default">
								<div class="panel-heading">搜索条件</div>
								<div class="panel-body">
									<div class="form-group">
										<label for="teacherName">教师名称</label> <input type="text"
											name="teacherName" class="form-control" />
									</div>
									<button class="selectTeacher btn btn-default">搜索</button>
								</div>
							</div>
						</div>
						<div class="col-md-12">
							<table id="teacherForm" class="table table-hover table-border"></table>
						</div>
					</div>
					<div class="modal-footer"></div>
				</div>
			</div>
		</div>

		<div class="modal fade" id="studentSelect" tabindex="-1" role="dialog">
			<div class="modal-dialog" role="document">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal"
							aria-label="Close">
							<span aria-hidden="true">&times;</span>
						</button>
						<h4 class="modal-title">选择学生</h4>
					</div>
					<div class="modal-body form-inline" style="overflow: hidden;">
						<div class="col-md-12">
							<div class="panel panel-default">
								<div class="panel-heading">搜索条件</div>
								<div class="panel-body">
									<div class="form-group">
										<label for="student-name">姓名：</label> <input type="text"
											class="form-control" id="student-name" />
									</div>
									<div class="form-group">
										<label for="studentClasses">班级：</label> <select
											id="studentClasses" class="form-control">
											<option value="">所有</option>
											<c:forEach items="${classes }" var="item">
												<option value="${item.name }">${item.name }</option>
											</c:forEach>
										</select>
									</div>
									<div class="form-group">
										<label for="studentProduct">产品：</label> <select
											id="studentProduct" class="form-control">
											<option value="">所有</option>
											<c:forEach items="${products }" var="item">
												<option value="${item.id }">${item.name }</option>
											</c:forEach>
										</select>
									</div>
									<button class="selectStudent btn btn-default">搜索</button>
								</div>
							</div>
						</div>
						<div class="col-md-12">
							<table id="studentForm" class="table table-hover table-border"></table>
						</div>
					</div>
					<div class="modal-footer"></div>
				</div>
			</div>
		</div>
	</div>
</body>
</html>